home *** CD-ROM | disk | FTP | other *** search
- /*
- IC Hello Cruel World.c
-
- The simplest IC aware program. It simply outputs Real Name preference,
- which is assumed to contain the text "\pHello Cruel World!"
- */
-
- #include <stdio.h>
- #include <stdlib.h>
-
- #include "IC Types.h"
- #include "IC API.h"
- #include "IC Keys.h"
-
- int main(){
- ICInstance instance;
- Str255 str;
- long str_size;
- ICAttr attr;
-
- printf("Hello Cruel World Test\n");
-
- if (ICStart(&instance,'????')==noErr){
- if (ICFindConfigFile(instance,0,NULL)==noErr){
- Str255 temp=kICRealName;
-
- str_size=sizeof(Str255);
-
- if (ICGetPref(instance,temp,&attr,(Ptr)str,&str_size)==noErr)
- printf("Real name is %#s\n",str);
- else
- printf("ICGetPref Error\n");
- } else
- printf("ICFindConfigFile error\n");
-
- ICStop(instance);
- } else
- printf("ICStart error\n");
- }